package com.a0soft.gphone.aTruffleHog.wnd;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;

public class ProgressDlgFrg extends DialogFragment {
    public static ProgressDlgFrg 
    NewInstance(int nTitleID, int nMsgID) 
    {
        ProgressDlgFrg frg = new ProgressDlgFrg();
        Bundle args = new Bundle();
        args.putInt("title", nTitleID);
        args.putInt("msg", nMsgID);
        frg.setArguments(args);
        return frg;
    }

    @Override public Dialog 
    onCreateDialog(Bundle savedInstanceState) 
    {
        int nTitleID = getArguments().getInt("title");
        int nMsgID = getArguments().getInt("msg");
        String strTitle = nTitleID != 0 ? getString(nTitleID) : null;
        String strMsg = nMsgID != 0 ? getString(nMsgID) : null;
        return ProgressDialog.show(getActivity(), strTitle, strMsg, true, false);
    }
}